#define _CRT_SECURE_NO_WARNINGS 1
#include "List.h"

void test1()
{
	ListNode* plist = ListCreate();
	ListPushBack(plist, 1);
	ListPrint(plist);
	ListPushBack(plist, 2); 
	ListPrint(plist);
	ListPushBack(plist, 3); 
	ListPrint(plist);
	ListPushBack(plist, 4);
	ListPrint(plist);

	ListPopBack(plist);
	ListPrint(plist);
	ListPopBack(plist);
	ListPrint(plist);
	ListPopBack(plist);
	ListPrint(plist);
	ListPopBack(plist);
	ListPrint(plist);
}

void test2()
{
	ListNode* plist = ListCreate();
	ListPushFront(plist, 1);
	ListPrint(plist);
	ListPushFront(plist, 2);
	ListPrint(plist);
	ListPushFront(plist, 3);
	ListPrint(plist);
	ListPushFront(plist, 4);
	ListPrint(plist);

	ListPopBack(plist);
	ListPrint(plist);
	ListPopBack(plist);
	ListPrint(plist);
	ListPopBack(plist);
	ListPrint(plist);
	ListPopBack(plist);
	ListPrint(plist);
}

void test3()
{
	ListNode* plist = ListCreate();
	ListPushFront(plist, 1);
	ListPrint(plist);
	ListPushFront(plist, 2);
	ListPrint(plist);
	ListPushFront(plist, 3);
	ListPrint(plist);
	ListPushFront(plist, 4);
	ListPrint(plist);

	ListPopFront(plist);
	ListPrint(plist);
	ListPopFront(plist);
	ListPrint(plist);
	ListPopFront(plist);
	ListPrint(plist);
	ListPopFront(plist);
	ListPrint(plist);
}

int main()
{
	test3();
	return 0;
}